package cn.edu.fzu.homemaking.domain.enums;

/**
 * @author yifan
 * @date 2023/4/5
 */
public enum LabelStatusEnum {
    BAN(1, "禁用"),
    NORMAL(0, "启用");

    private final int    value;
    private final String desc;

    private LabelStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static LabelStatusEnum parse(int value) {
        switch (value) {
            case 0:
                return NORMAL;
            case 1:
                return BAN;
            default:
                return null;
        }
    }
}
